<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
</head>
<body>

</body>
</html>
<script type="text/javascript">
	var str = 'scascasg';
	console.log(str.length);
	console.log(str.charAt(6));
	console.log(str.substr(0,2));
	console.log(str.substring(0,3));
	console.log(str.indexOf('s'));
	console.log(str.lastIndexOf('s'));

	var img = 'logo.300x300.png';
	// console.log(img.charAt(img.indexOf('.')));
	console.log(img.substr(0,img.indexOf('.')));
	// console.log(img.substring(0,img.indexOf('.')));
	console.log(img.substr(img.lastIndexOf('.')+1,3));
	// console.log(img.substring(img.lastIndexOf('.')+1,img.lastIndexOf('.')+4));

	var t1 = 'mmp,你打球像蔡徐坤';
	var t2 = '***';
	var t3 = 'mmp';
	var t4 = t1.replace(t3,t2);
	console.log(t4);

	var s = t1.search('蔡徐坤');
	console.log(s);

	var lowstr = 'i have a pen';
	var uppstr = 'HELLO WORLD';
	console.log(lowstr.toUpperCase());
	console.log(uppstr.toLowerCase());
</script>